home *** CD-ROM | disk | FTP | other *** search
- /*
- * Source - CShape.h
- * Author - Mark Bykerk Kauffman
- * Purpose - To define a small class of shapes using THINK C, and to illustrate
- * several key concepts of object oriented programming. All of these
- * classes use the convention of having a C as the first letter their
- * class name.
- */
-
- struct CShape : indirect
- {
- Rect Location;
-
- void SetShapeLoc(int A, int B,int C,int D);
- void Draw(void);
- void Erase(void);
- };
-
- /*
- * All of the following classes are descendants of CShape. They inherit all
- * of CShapes methods and instance variables.
- */
-
- struct COval : CShape
- {
- void Draw(void);
- void Erase(void);
- };
-
- struct CRectangle : CShape
- {
- void Draw(void);
- void Erase(void);
- };
-
- struct CLine : CShape
- {
- void Draw(void);
- void Erase(void);
- };